package cn.kgc.tangcco.tcbd1011.Reader.services.impl;

import java.util.List;

import cn.kgc.tangcco.tcbd1011.Reader.dao.ReaderDao;
import cn.kgc.tangcco.tcbd1011.Reader.entity.ReaderInfo;
import cn.kgc.tangcco.tcbd1011.Reader.services.ReaderServices;
import cn.kgc.tangcco.tcbd1011.comm.properties.PropertiesFactory;
import cn.kgc.tangcco.tcbd1011.util.Util;

public class ReaderServicesImpl implements ReaderServices {
	
	private ReaderDao  rdao;
	public ReaderServicesImpl() {
		rdao=(ReaderDao) PropertiesFactory.getInstance(Util.READERDAO);
	}

	@Override
	public ReaderInfo login(ReaderInfo reader) {
		return rdao.login(reader);
	}

	@Override
	public int addReader(ReaderInfo reader) {
		return rdao.addReader(reader);
	}

	@Override
	public int updateReader(ReaderInfo reader) {
		return rdao.updateReader(reader);
	}

	@Override
	public int deleteReader(int pk) {
		return rdao.deleteReader(pk);
	}

	@Override
	public List<ReaderInfo> queryAllReader(ReaderInfo  reader) {
		return rdao.queryAllReader(reader);
	}

	@Override
	public ReaderInfo detailReader(int pk) {
		return rdao.detailReader(pk);
	}

	@Override
	public int queryCountReader() {
		return rdao.queryCountReader();
	}

}
